<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<HTML>
<HEAD>
<TITLE>Modificar Abonado</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
      <script language='javascript' src="popcalendar.js"></script>
        <script type="text/JavaScript">
<!--
            function  cambiaProv(){
                var idabonado=document.getElementById("idabonado").value;
                var departamento=document.getElementById("departamento").value;
                var nombre=document.getElementById("nombre").value;
                var apellidop=document.getElementById("apellidop").value;
                var apellidom=document.getElementById("apellidom").value;
                var sexo=document.getElementById("sexo").value;
                var ecivil=document.getElementById("ecivil").value;
                var fechanac=document.getElementById("fechanac").value;
                var departamento=document.getElementById("departamento").value;
                var provincia=document.getElementById("provincia").value;
                var distrito=document.getElementById("distrito").value;
                var dir=document.getElementById("dir").value;
                var linea=document.getElementById("linea").value;
                var tipolinea=document.getElementById("tipolinea").value;

window.location="AbonadoServlet?action=modificar_abonado2&departamento="+departamento+"&idabonado="+idabonado+"&nombre="+nombre+"&apellidop="+apellidop+"&apellidom="+apellidom+"&sexo="+sexo+"&ecivil="+ecivil+"&fechanac="+fechanac+"&tipolinea="+tipolinea+"&departamento="+departamento+"&provincia="+provincia+"&distrito="+distrito+"&dir="+dir+"&linea="+linea;
            }

            function  cambiaDist(){
                var idabonado=document.getElementById("idabonado").value;
                var departamento=document.getElementById("departamento").value;
                var provincia=document.getElementById("provincia").value;
                var nombre=document.getElementById("nombre").value;
                var apellidop=document.getElementById("apellidop").value;
                var apellidom=document.getElementById("apellidom").value;
                var sexo=document.getElementById("sexo").value;
                var ecivil=document.getElementById("ecivil").value;
                var fechanac=document.getElementById("fechanac").value;
                var departamento=document.getElementById("departamento").value;
                var provincia=document.getElementById("provincia").value;
                var distrito=document.getElementById("distrito").value;
                var dir=document.getElementById("dir").value;
                var linea=document.getElementById("linea").value;
                var tipolinea=document.getElementById("tipolinea").value;

window.location="AbonadoServlet?action=modificar_abonado2&departamento="+departamento+"&idabonado="+idabonado+"&provincia="+provincia+"&nombre="+nombre+"&apellidop="+apellidop+"&apellidom="+apellidom+"&sexo="+sexo+"&ecivil="+ecivil+"&fechanac="+fechanac+"&tipolinea="+tipolinea+"&departamento="+departamento+"&provincia="+provincia+"&distrito="+distrito+"&dir="+dir+"&linea="+linea;
            }

            function modabo(){
                var idabonado=document.getElementById("idabonado").value;
                var departamento=document.getElementById("departamento").value;
                var provincia=document.getElementById("provincia").value;
                var nombre=document.getElementById("nombre").value;
                var apellidop=document.getElementById("apellidop").value;
                var apellidom=document.getElementById("apellidom").value;
                var sexo=document.getElementById("sexo").value;
                var ecivil=document.getElementById("ecivil").value;
                var fechanac=document.getElementById("fechanac").value;
                var distrito=document.getElementById("distrito").value;
                var dir=document.getElementById("dir").value;
                var linea=document.getElementById("linea").value;
                var tipolinea=document.getElementById("tipolinea").value;

window.location="AbonadoServlet?action=modabo&departamento="+departamento+"&idabonado="+idabonado+"&provincia="+provincia+"&nombre="+nombre+"&apellidop="+apellidop+"&apellidom="+apellidom+"&sexo="+sexo+"&ecivil="+ecivil+"&fechanac="+fechanac+"&tipolinea="+tipolinea+"&distrito="+distrito+"&dir="+dir+"&linea="+linea;
            }
           
//-->
        </script>
<script type="text/javascript">
<!--
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		butt_01_over = newImage("images/butt_01-over.jpg");
		butt_02_over = newImage("images/butt_02-over.jpg");
		butt_03_over = newImage("images/butt_03-over.jpg");
		butt_04_over = newImage("images/butt_04-over.jpg");
		butt_05_over = newImage("images/butt_05-over.jpg");
		butt_06_over = newImage("images/butt_06-over.jpg");
		preloadFlag = true;
	}}

function MM_popupMsg(msg) { //v1.0
  alert(msg);
}
//-->
</script>
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="livevalidation.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js_livevalidation_standalone.js"></script>
<link href="general.css" rel="stylesheet" type="text/css">
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css">
<link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css">

</HEAD>
<BODY BGCOLOR=#133F54 ONLOAD="preloadImages();" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div align="center">
  <TABLE WIDTH=774 BORDER=1 CELLPADDING=0 CELLSPACING=0>
    <TR>
      <TD width="178" height="218" align="center" valign="middle" class="logo"><p><strong>Chasqui-soft</strong></p>
      <p><img src="images/defaultlogo.gif" width="48" height="48" alt="logo"></p></TD>
      <TD width="590" align="left" valign="top"><img src="images/callcenter_banner.jpg" width="1009" height="216" alt="banner"></TD>
    </TR>
    <TR>

      <TD height="152"><img src="images/info_area.jpg" alt="back" width=178 height=270></TD>
      <TD rowspan="3" align="center" valign="top"><table width="500" height="522" border="0" cellspacing="0">
        <tr>
          <td width="583" height="522" align="center" valign="top" scope="col"><p>&nbsp;</p>
            <p class="Titlulos_General">Modificar Abonado</p>
            <p class="Titlulos_General"><img src="images/t_19.jpg" width="500" height="2" alt="serparador"></p>
            <table border=0 cellpadding=0 cellspacing=0 width=900>
              <tr>
                <td colspan=2 valign=top><p align=right>&nbsp;</p></td>
                <td width="1085" valign="top"><table width="964" height="390" border="0" cellpadding="0" cellspacing="0">
                  <form name ="prueba" method="post" action="AbonadoServlet">
                    <input type="hidden" name="action" id="action" value="">
                    <tr>
                      <td width="300" height="22">&nbsp;</td>
                      <td colspan="2" class="texto"><strong>Ingreso manual:</strong></td>
                      <td>&nbsp;</td>
                      </tr>
                      <tr>
                      <td width="300"><label>
                        <input  name="idabonado" type="hidden" id="idabonado" value="${requestScope.idabonado}" size="30" maxlength="70">
                        </label></td>
                    </tr>
                    <tr>
                      <td colspan="2">&nbsp;</td>
                      <td class="texto">&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td colspan="2">&nbsp;</td>
                      <td width="279" class="texto">Nombre del Abonado:</td>
                      <td width="384"><label>
                        <input name="nombre" type="text" id="nombre" value="${requestScope.nombre}" size="30" maxlength="70">
                        </label></td>
                    </tr>
                    <script type="text/javascript">
                    var nombr = new LiveValidation('nombre');
                    nombr.add( Validate.Length, { minimum: 1, maximum: 15 } );
                    nombr.add(Validate.Presence);
                    nombr.add(Validate.Exclusion2, { within: ["'",'|','°','¬','!','"','#','$','%','&','/',')','=','?','¿','¡','´','+','*','¨','{','[',',',';','.',':','-','_','*','@','0','1','2','4','3','5','6','7','8','9'], partialMatch: true })
                    </script>
                    <tr>
                      <td colspan="2">&nbsp;</td>
                      <td width="279" class="texto">Apellido Paterno:</td>
                      <td width="384"><label>
                        <input name="apellidop" type="text" id="apellidop" value="${requestScope.apellidop}" size="30" maxlength="70">
                        </label></td>
                      </tr>
                      <script type="text/javascript">
                    var apellido = new LiveValidation('apellidop');
                    apellido.add( Validate.Length, { minimum: 1, maximum: 15 } );
                    apellido.add(Validate.Presence);
                    apellido.add(Validate.Exclusion2, { within: ["'",'|','°','¬','!','"','#','$','%','&','/',')','=','?','¿','¡','´','+','*','¨','{','[',',',';','.',':','-','_','*','@','0','1','2','4','3','5','6','7','8','9'], partialMatch: true })
                    </script>
                    <tr>
                      <td colspan="2">&nbsp;</td>
                      <td width="279" class="texto">Apellido Materno:</td>
                      <td width="384"><label>
                        <input name="apellidom" type="text" id="apellidom" value="${requestScope.apellidom}" size="30" maxlength="70">
                        </label></td>
                      </tr>
                      <script type="text/javascript">
                    var apellidomat = new LiveValidation('apellidom');
                    apellidomat.add( Validate.Length, { minimum: 1, maximum: 15 } );
                    apellidomat.add(Validate.Presence);
                    apellidomat.add(Validate.Exclusion2, { within: ["'",'|','°','¬','!','"','#','$','%','&','/',')','=','?','¿','¡','´','+','*','¨','{','[',',',';','.',':','-','_','*','@','0','1','2','4','3','5','6','7','8','9'], partialMatch: true })
                    </script>
                    <tr>
                      <td colspan="2">&nbsp;</td>
                      <td class="texto">Sexo :</td>
                      <td><label>
                        <select name="sexo" id="sexo">
                          <option selected="true" value="${requestScope.sexo}">${requestScope.sexo}</option>
                          <option>F</option>
                          <option>M</option>
                          </select>
                        </label></td>
                      </tr>
                     <tr>
                      <td colspan="2">&nbsp;</td>
                      <td class="texto">Estado civil :</td>
                      <td><label>
                        <select name="ecivil" id="ecivil">
                          <option selected="selected">${requestScope.ecivil}</option>
                          <option>soltero</option>
                          <option>casado</option>
                          </select>
                        </label></td>
                </tr>

                    <tr>
                      <td colspan="2">&nbsp;</td>
                      <td class="texto">Fecha de Nacimiento:</td>
                      <td><input name="fechanac" type="text" id="fechanac" value="${requestScope.fechanac}" onClick="popUpCalendar(this, form.dateArrival1, 'yyyy-mm-dd');" size="10"></td>
                      </tr>
                    <tr>
                      <td colspan="2">&nbsp;</td>
                      <td class="texto">Departamentos:
                      <td width="384"><select name="departamento" id="departamento" onChange ="cambiaProv(); return true">
                          <option>Seleccionar</option>
                          <c:forEach var="departamentos" items="${requestScope.departamentos}">
                          <c:if test="${departamentos.descripcion==departamento}">
                            <option selected="true" value="${departamentos.idDepartamento}">${departamentos.descripcion}</option>
                           </c:if>
                            <c:if test="${departamentos.idDepartamento!=departamento}">
                            <option value="${departamentos.idDepartamento}">${departamentos.descripcion}</option>
                            </c:if>
                              </c:forEach>
                          </select></td>
                      </tr>
                      <tr>
                      <td colspan="2">&nbsp;</td>
                      <td class="texto">Provincias:
                      <td width="384"><select name="provincia" id="provincia"  onChange ="cambiaDist(); return true">
                            <option>Seleccionar</option>
                          <c:forEach var="provincias" items="${requestScope.provincias}">
                            <c:if test="${provincias.descripcion==provincia}">
                            <option selected="true" value="${provincias.idProvincia}">${provincias.descripcion}</option>
                            </c:if>
                            <c:if test="${provincias.descripcion!=provincia}">
                            <option value="${provincias.idProvincia}">${provincias.descripcion}</option>
                            </c:if>
                          </c:forEach>
                          </select></td>
                      </tr>
                      <tr>
                      <td colspan="2">&nbsp;</td>
                      <td class="texto">Distrito:
                      <td width="384"><select name="distrito" id="distrito">
                          <option>Seleccionar</option>
                          <c:forEach var="distritos" items="${requestScope.distritos}">
                            <c:if test="${distritos.descripcion==distrito}">
                            <option selected="true" value="${distritos.idDistrito}">${distritos.descripcion}</option>
                            </c:if>
                            <c:if test="${distritos.descripcion!=distrito}">
                            <option value="${distritos.idDistrito}">${distritos.descripcion}</option>
                            </c:if>
                          </c:forEach>
                          </select></td>
                      </tr>
                    <tr>
                      <td height="22" colspan="2">&nbsp;</td>
                      <td class="texto">Direcci&oacute;n:</td>
                      <td><label>
                        <input name="dir" type="text" id="dir" value="${requestScope.dir}" size="30" maxlength="70">
                        </label></td>
                      </tr>
                      <script type="text/javascript">
                    var dire = new LiveValidation('dir');
                    dire.add( Validate.Length, { minimum: 1, maximum: 15 } );
                    dire.add(Validate.Presence);
                    dire.add(Validate.Exclusion3, { within: ["'",'|','°','¬','!','"','$','%','&','/',')','=','?','¿','¡','´','+','*','¨','{','[',',',';',':','*','@'], partialMatch: true })
                    </script>
                    <tr>
                      <td colspan="2">&nbsp;</td>
                      <td class="texto">L&iacute;nea:</td>
                      <td><input  readonly name="linea" type="text" id="linea" value="${requestScope.linea}"   size="30" maxlength="70"></td>
                      </tr>
                      <script type="text/javascript">
                    var lineas = new LiveValidation('linea');
                    lineas.add( Validate.Length, { minimum: 1, maximum: 6 } );
                    lineas.add(Validate.Presence);
                    lineas.add(Validate.Numericality,{onlyInteger: true})
                    </script>
                    <tr>
                      <td colspan="2">&nbsp;</td>
                      <td class="texto">Tipo de Linea<td width="384">
                          <select name="tipolinea" id="tipolinea" >
                          <option>Seleccione</option>
                          <c:forEach var="tipolineas" items="${requestScope.tipolineas}">
                            <c:if test="${tipolineas.nombre==tipolinea}">
                            <option selected="true" value="${tipolineas.nombre}">${tipolineas.nombre}</option>
                            </c:if>
                            <c:if test="${tipolineas.nombre!=tipolinea}">
                            <option value="${tipolineas.nombre}">${tipolineas.nombre}</option>
                            </c:if>
                          </c:forEach>
                          </select></td>
                      </tr>
                    <tr>
                      <td height="22" colspan="2">&nbsp;</td>
                      <td class="texto">&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td height="24" colspan="2" class="texto"><p>&nbsp;</p></td>
                      <td><span class="texto">Confirmar modificacion del abonado:</span></td>
                      <td width="384" rowspan="2"><input type="submit" onClick="modabo();return true;" name="modificar" id="modificar" value="   Modificar abonado  "></td>
                    </tr>
                    </form>
</table></td>
                          </table>
            <p class="Titlulos_General"></p></td>
        </tr>
      </table></TD>
    </TR>
    <TR>

      <TD width="400" height="208" valign="top" bgcolor="#E4560B"><ul id="MenuBar1" class="MenuBarVertical">
        <li><a href="index2.jsp">Home</a></li>
        <li><a href="clientes2.jsp">Clientes</a></li>
        <li><a href="usuario2.jsp" class="MenuBarItemSubmenu">Administraci&oacute;n</a>
          <ul>
            <li><a href="AbonadoServlet">Abonados</a></li>
            <li><a href="CampanaServlet">Campa&ntilde;as</a></li>
            <li><a href="modificar_usuario.jsp">Empleados</a></li>
            <li><a href="ReportesServlet?action=listreportes">Reportes</a></li>
           	<li><a href="CampanaServlet?action=volverusuario">Cerrar Sesi&oacute;n</a></li>
          </ul>
        </li>
        <li><a href="noticias2.jsp">Noticias</a></li>
        <li><a href="soporte2.jsp">Soporte</a></li>

        <li><a href="contactanos2.jsp">Cont&aacute;ctanos</a></li>
</ul></TD>
    </TR>
    <TR>
      <TD height="169" valign="top"><img src="images/info_area.jpg" alt="back" width=178 height=270></TD>
    </TR>
  </TABLE>
</div>
<!--Jansondesigns.com offers an impressive collection of professionally made web templates, banner templates,
flash designs, free templates and free web graphics. We have templates that suit any personal or professional web site needs!! -->

<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</BODY>
</HTML>